class CreateNodes < ActiveRecord::Migration
  def self.up
    create_table :nodes do |t|
      t.column "name",                :string
      t.column "sys_uptime",          :integer
      t.column "sys_load",            :integer
      t.column "sys_memfree",         :integer
      t.column "last_seen",           :datetime
      t.column "ssid",                :string
      t.column "pssid",               :string
      t.column "mac",                 :string
      t.column "remote_addr",         :string
      t.column "lat",                 :float
      t.column "lng",                 :float
      t.column "ele",                 :float
      t.column "incoming_bytes",      :integer
      t.column "outgoing_bytes",      :integer
      t.column "gateway",             :boolean
    end
  end

  def self.down
    drop_table :nodes
  end
end
